How to Add a Border and Curved Corners to Buttons in Swift (IOS ...
將cornerRadius設為button高度的一半,然後再設定borderWidth&borderColor,即可實現膠囊形狀的邊框。...執行App後,將看到button的膠囊形狀邊框。,为了设置文字与边框的距离,我们可以利用`contentEdgeInsets`属性:```swiftbutton.contentEdgeInsets=UIEdgeInsets...。參考影片的文章的如下: